#include "xmlhelper.h"

void XmlHelper::addSimpleXmlNode(QDomNode &node, const QString &name, const QString &value)
{
    QDomElement simpleElement = node.ownerDocument().createElement(name);

    simpleElement.setAttribute("value", value);
    node.appendChild(simpleElement);
}

void XmlHelper::addProperty(QDomNode &node, const QString &name, const QString &value)
{
    QDomElement propElement = node.ownerDocument().createElement("prop");

    propElement.setAttribute("value", value);
    propElement.setAttribute("name",name);

    node.appendChild(propElement);
}

void XmlHelper::addProperty(QDomNode &node, const QString &name, int value)
{
    addProperty(node, name, QString::number(value));
}
